<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form"%>

<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->

<head>
<jsp:include page="../../views/include/header.jsp" />
 
</head>
<body>
<sf:form method="post" modelAttribute="participantFilter">
	<input type="submit" name="_eventId_registration" value="Registration Report">
	<input type="submit" name="_eventId_excel" value="Save as Excel"/>
	<input type="submit" name="_eventId_resentemail" value="Resent Email" onclick="javascript:validateSelectAtLeastOne();"/>
	<input type="hidden" name="_flowExecutionKey" value="${flowExecutionKey}" />
<h2>Participant Report</h2>
<table border="1"><tbody>
<tr>
	<th></th>
	<th>Participant Id</th>
	<th>Registration Id</th>
	<th>Pledger?</th>
	<th>Company</th>
	<th>Salutation</th>
	<th>First Name</th>
	<th>Last Name</th>
	<th>Badge Name</th>
	<th>Designation</th>
	<th>Contact No</th>
	<th>Email</th>
	<th>Plenary</th>
	<th>Breakout 1</th>
	<th>Breakout 2</th>
	<th>Post 1</th>
	<th>Post 2</th>
	<th>Amount</th>
	<th>Status</th>
</tr>
<c:set var="index" value="0"/>
<c:forEach items="${registerList}" var="r" varStatus="rStatus">
<c:forEach items="${r.participantList}" var="p" varStatus="pStatus">
<tr>
	<td><sf:checkbox path="selectedContentIds[${index}]"/></td> <c:set var="index" value="${index+1}"/>
	<td><c:out value="${p.id}"/></td>
	<td><c:out value="${r.id}"/></td>
	<td><c:out value="${r.pledger}"/></td>
	<td><c:out value="${r.companyName}"/></td>
	<td><c:out value="${p.salutation}"/></td>
	<td><c:out value="${p.firstName}"/></td>
	<td><c:out value="${p.lastName}"/></td>
	<td><c:out value="${p.badgeName}"/></td>
	<td><c:out value="${p.designation}"/></td>
	<td><c:out value="${p.telephone}"/></td>
	<td><c:out value="${p.email}"/></td>
	<td><c:out value="${p.main}"/></td>
	<td><c:out value="${p.breakout1}"/></td>
	<td><c:out value="${p.breakout2}"/></td>
	<td><c:out value="${p.post1}"/></td>
	<td><c:out value="${p.post2}"/></td>
	<td><fmt:formatNumber type="currency" value="${p.amount}" currencySymbol="S$"/></td>
	<td>
		<c:choose>
			<c:when test="${r.status eq 0}">Pending</c:when>
			<c:when test="${r.status eq 1}">Confirmed</c:when>
			<c:when test="${r.status eq 2}">Cancelled</c:when>
			<c:otherwise>${r.status}</c:otherwise>
		</c:choose>
	</td>
</tr>
</c:forEach>
</c:forEach>
</tbody></table>

</sf:form>
</body></html>